import React, { Component } from 'react';
import { Swiper } from 'antd-mobile'


class Swiperz extends Component {
    constructor(props){
        super(props);
        this.state = {
            swiperzlist:[
                {
                    "id":"1",
                    "icon":"https://s1.ax1x.com/2021/12/10/o5HkOP.jpg",
                    "link":"123456789"
                  },
                  {
                    "id":"2",
                    "icon":"https://s1.ax1x.com/2021/12/10/o5HkOP.jpg",
                    "link":"123456788"
                  },
                  {
                    "id":"3",
                    "icon":"https://s1.ax1x.com/2021/12/10/o5HkOP.jpg",
                    "link":"123456787"
                  },
                  {
                    "id":"4",
                    "icon":"https://s1.ax1x.com/2021/12/10/o5HkOP.jpg",
                    "link":"123456786"
                  },

            ],
            i:0,
        }
    }
    render() {
        return (
            <div className="swiperz">
                    <Swiper autoplay autoplayInterval={1000}>
                    {
                        this.state.swiperzlist.map((item,index)=>{
                            return (
                                <Swiper.Item key={index}>
                                    <a href={item.link}><img src={item.icon} alt="" /></a>
                                </Swiper.Item>
                            )
                        })
                    }
                </Swiper>

            </div>
        );
    }
}
export default Swiperz;        
